<?

function check_access(){
    global $conn_db, $PHP_AUTH_USER, $PHP_AUTH_PW, $PHSHURE;
    $sql="SELECT * FROM users WHERE login='admin'";
    $result=mysql_fetch_array(mysql_query($sql, $conn_db));
    if (($PHP_AUTH_USER!=$result["login"])||($PHP_AUTH_PW!=$result["passwd"])){
        header("WWW-Authenticate: Basic realm=\"VC8000\"");
        echo xparse("tpl/login.html");
        exit();
    }
}

?>